package com.julang.check.api.entity;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.annotation.JsonIgnore;
import com.julang.check.bean.BaseEntity;
import com.baomidou.mybatisplus.annotation.TableName;
import java.time.LocalDateTime;
import com.baomidou.mybatisplus.annotation.TableField;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

import static com.julang.check.utils.CommonData.DATEFORMATTER;

/**
* <p>
* 
* </p>
* @author 赵自强
* @since 2019-06-05
*/
@Data
@EqualsAndHashCode(callSuper = true)
@Accessors(chain = true)
@TableName("j_yy_report")
@ApiModel(value = "YyHtmlReport", description = "PaperYY检测报告的相关信息")
public class YyHtmlReport extends BaseEntity {

    private static final long serialVersionUID = 1L;

    /**文件的所属用户id*/
    @TableField("user_id")
    @JsonIgnore
    @ApiModelProperty(value = "文件的所属用户id")
    private Integer userId;

    /**文件名字*/
    @TableField("file_name")
    @JsonIgnore
    @ApiModelProperty(value = "文件名字")
    private String fileName;

    /**0代表未解析1代表已解析*/
    @TableField("file_status")
    @ApiModelProperty(value = "0代表未解析1代表已解析")
    private Integer fileStatus;

    /**文件对应的doc*/
    @TableField("doc_path")
    @ApiModelProperty(value = "文件对应的doc")
    private String docPath;

    /**文件的上传时间*/
    @TableField("upload_time")
    @ApiModelProperty(value = "文件的上传时间")
    @JsonFormat(pattern = DATEFORMATTER)
    private LocalDateTime uploadTime;

    /**文件的解析时间*/
    @TableField("analysis_time")
    @JsonFormat(pattern = DATEFORMATTER)
    @ApiModelProperty(value = "文件的解析时间")
    private LocalDateTime analysisTime;

    /**同义词的替换记录*/
    @TableField("replace_file_path")
    @ApiModelProperty(value = "同义词的替换记录")
    private String replaceFilePath;

    /**论文的文档名称*/
    @TableField("word_name")
    @ApiModelProperty(value = "论文的文档名称")
    private String wordName;

    /**论文总字数*/
    @TableField("total_word_count")
    @ApiModelProperty(value = "论文总字数")
    private String totalWordCount;

    /**重复总字数*/
    @TableField("repeat_word_count")
    @ApiModelProperty(value = "重复总字数")
    private String repeatWordCount;

    /**论文重复占比*/
    @TableField("repeat_percent")
    @ApiModelProperty(value = "论文重复占比")
    private String repeatPercent;

    /**重复词语个数*/
    @TableField("duplicate_words_total")
    @ApiModelProperty(value = "重复词语个数")
    private int duplicateWordsTotal;

    /**重复词语出现总次数*/
    @TableField("repetitions_number")
    @ApiModelProperty(value = "重复词语出现总次数")
    private int repetitionsNumber;

    public YyHtmlReport(Integer userId, String fileName) {
        this.userId = userId;
        this.fileName = fileName;
    }
}
